Using the Sprite Editor
Introduction
Status and Click-Options Display
Frame Data Keyboard Controls
Frame Graphic Import Feature
Introduction
Once editing mode has been entered by pressing Ctrl+Tab during gameplay while running a non-"packed"/"protected" game, pressing "2" while in any other editing mode will activate the Sprite Editor.
The Sprite Editor is available for creating and manipulating the Sprite data used by
Player Characters and Game Objects for graphic drawing, collision area testing, and certain other special functions.
This editor also allows viewing of Animations that apply
to the selected Sprite type. It does not, however, know whether or not an Function that
is selectable with any certain Sprite belongs with that Sprite, or if it contains any Script Commands that perform any operations not directly related to single-Function Animation. Do not
attempt to play a non-Animation Function, or an Animation that does not belong to the currently-selected Sprite. Doing so will lead to program crashes. The same
applies to complex Animations that manipulate Object Variables, Player Variables, or any other property of an active Object or Player aside from their animation frames, because there
is no Object/Player to manipulate.
While editing Player Character Sprites, only that Player Character's
Scripted Functions will be available for viewing as Animations. Remember that this Function listing contains control Functions intermixed
with Animation Functions.
While editing Object Sprites, all Scripted Object Animation Functions will be available. The Area for which the currently-selected Function was loaded will be displayed as "G" for "Game", "Z" for "Zone", or "A" for "Act", and the ID number will reflect its position within that list.
The pointer, represented by an arrow, is moved by the mouse.
On the left side of the screen is the status display. On the right side is the currently-selected Sprite, and a crosshair, whose center represents "Object Position"/"Player Position".
Status and Options Display
The Status and Options Display shows the following elements:
Player/Object (Sprite Set Type and ID)
This section will read "Player" when Player Sprites are selected for editing, and "Object" when Object Sprites are selected for editing.
By default, it reads "None Selected"
Left-click to change the selected Sprite type.
The value specifies which Player Character or Object Sprite Set is selected for editing.
When an Object Sprite Set is selected, two more options become available:
Ins
Left-click this option to insert a new Object Sprite Set containing one blank Sprite Frame into the currently-selected list ("Game", "Zone", or "Act") in front of the one that is currently selected. This changes the IDs of all following Sprite Sets, and thus, any Object Def that references them must be updated.
Hold Ctrl and Left-click this option to add a new Object Sprite Set containing one blank Sprite Frame to the end of the list for the current Sprite Set Type ("Game", "Zone", "Act"). This does not affect other Sprite Set IDs, and so, requires no modifying of existing Object Def data.
Del
Left-click this option to delete the currently-selected Object Sprite Set from its list ("Game", "Zone", or "Act"), along with all Sprite Frame data that it contains. This changes the IDs of any Sprite Sets that follow, and thus, any Object Def that references them must be updated.
Frame
This is the ID number of the currently-selected Frame of the currently-selected Sprite.
There are four Frame options that also appear in this section:
Import
Export
Left-click this option to dump the currently-selected Frame Graphic to the file "SH000000.tga" in the currently-running game's "Dump" folder. If the folder does not already exist, it will be created. Any existing file of the same name will be overwritten.
Hold Ctrl and Left-click this option to dump Frame Graphics from all Sprite Frames in the currently-selected Set to the files "SH??????.tga" (where "??????" is the six-digit zero-filled ID number of the Frame the file was made from) in the currently-running game's "Dump" folder. If the folder does not already exist, it will be created. Any existing files of the same names will be overwritten.
Ins
Left-click this option to insert a new blank Sprite Frame into the currently-selected Sprite Set in front of the one that is currently selected. This changes the IDs of all following Sprite Frames, and thus, any Animation Function that references them must be updated.
Hold Ctrl and Left-click this option to add a new blank Sprite Frame to the end of the currently-selected Sprite Set. This does not affect other Sprite Frame IDs, and so, requires no modifying of existing Animation Functions.
Del
Left-click this option to delete the currently-selected Sprite Frame from the currently-selected Sprite Set. This changes the IDs of any Sprite Frames that follow, and thus, any Animation Function that references them must be updated.
Size
These values are the width and height of the currently-selected Frame, in that order.
Nrm Draw Off
Rev Draw Off
The "Nrm" section lists the X Drawing Offset of the currently-selected Frame when viewed unmirrored, and
the Y Drawing Offset of the currently-selected Frame when viewed unflipped.
The "Rev" section lists the X Drawing Offset of the currently-selected Frame when viewed mirrored, and
the Y Drawing Offset of the currently-selected Frame when viewed flipped.
Left-click this area to select "Drawing Offsets" for editing.
When "Drawing Offsets" are selected for editing, two more options become available:
Affect Boxes
When active, this option is highlighted, and causes Collision Boxes and Hotspots to "follow" the Sprite Frame image as the Draw Offsets are moved.
When inactive, Collision Boxes and Hotspots will remain where they are when the Draw Offsets are modified.
Left-click this option to toggle on or off.
Auto Center
When active, this option is highlighted, and causes the editing of "Normal" or "Reverse" Draw Offsets to affect each other such that when the Sprite is Mirrored/Flipped, the Mirroring/Flipping is centered on the Object/Player Position (the crosshair).
When inactive, "Normal" and "Reverse" Draw Offsets must be modified individually.
Left-click this option to toggle on or off.
Flip Mirror
These are the current Vertical Flip and Horizontal Mirror view settings. If either one is active, it will be highlighted.
Left-click either setting to toggle it on or off.
NAttack
NHurt
These values specify the number of "Attack" and "Hurt" Boxes that are currently defined for the currently-selected Frame.
Mn Atk Hrt S
In order, these options are "MainBounds Box", "Attack Box", "Hurt Box", and "Hotspot".
The highlighted abbreviation represents the Collision Box (or Hotspot) type that is currently-selected
for editing.
Left-click the abbreviation that corresponds with the desired type to select it for editing.
Selecting any of these types will cause different information to appear directly below:
Mn
From left-to-right, top-to-bottom, the currently-selected Frame's "MainBounds" X1, Y1, X2, and Y2 settings are displayed.
Atk
First, ID number of the currently-selected "Attack Box" from the currently-selected Frame is displayed
Below that, from left-to-right, top-to-bottom, That Box's X1, Y1, X2, and Y2 position settings are displayed.
To the right of those settings are the "INS" and "DEL" options. Left-click either option to insert
a new "Attack Box" into the list for the currently-selected Frame, or to delete the currently-selected "Attack Box" from
the currently-selected Frame.
Hrt
First, ID number of the currently-selected "Hurt Box" from the currently-selected Frame is displayed
Below that, from left-to-right, top-to-bottom, That Box's X1, Y1, X2, and Y2 position settings are displayed.
To the right of those settings are the "INS" and "DEL" options. Left-click either option to insert
a new "Hurt Box" into the list for the currently-selected Frame, or to delete the currently-selected "Hurt Box" from
the currently-selected Frame.
S
First, ID number of the currently-selected "Hotspot" from the currently-selected Frame is displayed
Below that, from top-to-bottom, That Spot's X and Y position settings are displayed.
To the right of those settings are the "INS" and "DEL" options. Left-click either option to insert
a new "Hotspot" into the list for the currently-selected Frame, or to delete the currently-selected "Hotspot" from
the currently-selected Frame.
Ani ID
This value specifies the Player/Object Function that is selected to view as Animation.
Left-click the word "Ani ID" to cause the selected Animation Function to play.
Remember that this is likely to cause a program crash if a non-Animation Function, or a complex Animation Function that attempts to modify Player Variables, Object Variables, or other Player/Object properties is selected.
Right-click the word "Ani ID" to cause Collision Boxes and Hotspots to be visible during the Animation.
This also causes Collision Boxes to display for Player Characters during gameplay.
Save
Left-click the word "Save" to save all sprite data within the range of the currently-selected type (no other types will be saved). If a Character Sprite is selected, all sprites for that character (and only that character) will be saved. If a Game Object Sprite is selected, all Game Object Sprites will be saved into the Object Sprite file currently loaded as Game-Global. A similar rule applies when a "Zone"-specific sprite or "Act"-specific sprite is selected (only "Zone" or "Act" sprites are saved to the appropriate files, respectively).
F3 may also be used to save all sprites within the range of the currently-selected type.
If the sprite file corresponding with the current range (Char/Game/Zone/Act) does not yet exist, it will be created when a "Save" operation is performed.
If Sprites for the current range (Char/Game/Zone/Act) were loaded from the old "def file" format rather than from the new ".spr" file format, they will be saved to the game's root folder in a file named "chr.spr" in the case of Character Sprites, and "obj.spr" in the case of Game, Zone, or Act Object Sprites.
Frame Data Keyboard Controls
Sprite Set ID Select
Press "C" or "V" to select the Player/Object Sprite Set to edit.
Sprite Frame ID Select
Press "A" or "Z" to select the Sprite Frame of the selected Set to edit.
Collision Box / Hotspot ID Select
Animation Function ID Select
Press "B" or "N" to select the Player/Object Function to view as an Animation.
Click the "Ani ID" Status/Option element to toggle the Animation on or off.
Collision Box X1/Y1 and Hotspot X/Y Movement
Use "T", "G", "F", and "H" to move the X1 and Y1 positions for the selected Collision Box, or the X and Y "Normal" Drawing Offset settings up, down, left, or right, respectively.
To select whether a Collision Box or Drawing Offset is being edited, left-click any of the "Mn Atk Hrt S" or "??? Draw Off" Status/Option elements.
Collision Box X2/Y2 Movement
Use "I", "K", "J", and "L" to move the X2 and Y2 positions for the selected Collision Box, the X and Y "Reverse" Drawing Offset settings, or the X and Y positions of the currently-selected Hotspot up, down, left, or right, respectively.
To select whether a Collision Box, Hotspot, or Drawing Offset is being edited, left-click any of the "Mn Atk Hrt S" or "??? Draw Off" Status/Option elements.
Mass Frame Display/Collision Offsets Adjustment
Use the arrow keys to move all Frames of the currently-selected Sprite Set and all of their Collision Boxes up, down, left, or right all at once.
Frame Graphic Import Feature
The Frame Graphic Import Mode, entered by clicking the "Import" option on the Status and Options Panel of the Sprite Editor, is made up of two parts:
File Selection Menu:
When an imported image file has not yet been selected for the current game, this menu is the first thing to be presented after the "Import" option is used.
Search For and Highlight Image File:
Use the Up and Down Arrow Keys to find the desired file/folder within the selection list.
Select Image File:
Press Enter to open the highlighted folder, or to select the highlighted image file and open the View/Select screen.
File Type View Toggle:
Press the Left Arrow Key to toggle between browsing for ".tga" files and ".pcx" files.
Abort:
Press the Right Arrow Key to go back to the Sprite Editor without selecting an image file.
Image View and Graphic Selection Screen:
When an image is selected from within the File Selection menu, this screen is presented. It also appears immediately upon selecting the "Import" option in the Sprite Editor if an import image has already been loaded for the current game.
Scroll a Larger Image:
Move the Mouse to the edges of the screen to scroll across an image that is larger in size.
Use the Arrow Keys to scroll more slowly across a larger image.
Mark Image Region Selection:
Position the Mouse Cursor at the upper-left corner of the desired image section, and then Left-click and drag until the selection rectangle perfectly encompasses the desired area.
Right-click to remove an existing selection box.
Import Marked Selection:
Press Enter to import the selected region as the new Frame graphic for the currently-selected Sprite Frame and return to the Sprite Editor.
Pressing Enter while there is no Selection Box will return to the Sprite Editor without importing a new Frame graphic.
Select a New Import Image:
Press Spacebar to return to the File Selection Menu to select a new image from which to obtain the Frame Graphic.